home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 June / MacFormat 25.iso / Shareware City / Developers / Tools Plus 2.5.3 Evaluation Kit / Tools Plus 2.5.3 / User Manual / 02-Installing Tools Plus < prev    next >
Encoding:
INI File  |  1994-09-17  |  11.4 KB  |  247 lines  |  [TEXT/ttxt]

  1. [Display using Monaco 9]
  2.  
  3.  
  4. 2  Installing Tools Plus
  5. ````````````````````````
  6.  
  7.  
  8.  
  9.  
  10.  
  11. Tools Plus Contents
  12. ```````````````````
  13. Tools Plus for THINK C/C++ and Tools Plus for THINK Pascal are located in two separate folders.  Tools Plus is made up of the following items:
  14.  
  15.    “ToolsPlus.Lib1”  Library containing Tools Plus routines (1 of 3)
  16.  
  17.    “ToolsPlus.Lib2”  Library containing Tools Plus routines (2 of 3)
  18.  
  19.    “ToolsPlus.Lib3”  Library containing Tools Plus routines (3 of 3)
  20.  
  21.    “ToolsPlus.h”     C header file for Tools Plus
  22.                      (C only)
  23.  
  24.    “ToolsPlus.c”     Source code for routines that must be compiled with
  25.                      your application.  These routines will be compiled
  26.                      according to your project’s compiler settings for
  27.                      680x0 processor and/or math co-processor
  28.                      optimization.
  29.                      (C only)
  30.  
  31.    “ToolsPlus.p”     Pascal interface file for Tools Plus
  32.                      (Pascal only)
  33.  
  34.    “Palette WDEF”    Optional resource file containing the WDEF resource
  35.                      (window definition) for floating palettes. Found in
  36.                      the “Optional Resources” folder.
  37.  
  38.    “Demos”           Folder containing a demo application and its source
  39.                      code
  40.  
  41.  
  42.  
  43.  
  44.  
  45. Installing Tools Plus for THINK C
  46. `````````````````````````````````
  47.   This User Manual is also part of the Tools Plus package.  Drag the ToolsPlus.Lib1, ToolsPlus.Lib2 and ToolsPlus.Lib3 libraries into the C Libraries folder, and ToolsPlus.h into the Mac #includes folder, or where ever you keep your other libraries and header files.  You can drag the ToolsPlus.c file into your C Libraries folder, even though it is not a library.  Keeping it with the ToolsPlus.Lib1, ToolsPlus.Lib2 and ToolsPlus.Lib3 libraries will help to remind you to include ToolsPlus.c in your project.
  48.  
  49.  
  50.  
  51.  
  52.  
  53. Adding Tools Plus to a THINK C Project
  54. ``````````````````````````````````````
  55.   To add Tools Plus to a THINK C project, first open your project, then use the Source menu’s Add… command to add the file ToolsPlus.Lib1, ToolsPlus.Lib2, ToolsPlus.Lib3, and ToolsPlus.c.
  56.   Though libraries can be located anywhere in your project, placing them at the top will organize it a little better.  Drag each of the libraries (ToolsPlus.Lib1, ToolsPlus.Lib2, and ToolsPlus.Lib3) into their own segment.  For convenience, drag ToolsPlus.c to the segment containing the last Tools Plus library.
  57.  
  58.  
  59.  
  60.  
  61.  
  62. Tools Plus Segments in THINK C
  63. ``````````````````````````````
  64.   The segments containing Tools Plus libraries will be constantly accessed while your application is running.  It is preferable to pre-load those segments by flagging them as “Preload.”
  65.  
  66. Warning: Do not unload the segments containing Tools Plus libraries.
  67.          You can ensure that this doesn’t happen accidentally by
  68.          flagging them as not “Purgeable.”
  69.  
  70.  
  71.  
  72.  
  73. -----------------------------------------------------------------------
  74.  
  75.  
  76.  
  77.  
  78. Installing Tools Plus for THINK Pascal
  79. ``````````````````````````````````````
  80. This User Manual is also part of the Tools Plus package.  Drag the ToolsPlus.Lib1, ToolsPlus.Lib2, and ToolsPlus.Lib3 libraries into the Libraries folder, and ToolsPlus.p into the Interface folder, or where ever you keep your other libraries and interfaces.
  81.  
  82.  
  83.  
  84.  
  85.  
  86. Adding Tools Plus to a THINK Pascal Project
  87. ```````````````````````````````````````````
  88.   To add Tools Plus to a THINK Pascal project, first open your project, then use the Project menu’s Add File command to add the files ToolsPlus.Lib1, ToolsPlus.Lib2, ToolsPlus.Lib3, and ToolsPlus.p to your project.
  89.  
  90.   Build Order…
  91.     Though libraries can be located anywhere in your build order,
  92.     placing them near the top (early in the compiling order) will
  93.     organize your project a little better.  The ToolsPlus.p interface
  94.     has to be compiled BEFORE your source code makes reference to it.
  95.     Placing it immediately below the libraries is a good, safe place
  96.  
  97.   By Segment…
  98.     Drag each of the Tools Plus libraries into their own segment.  For
  99.     convenience, drag the ToolsPlus.p interface file into the segment
  100.     containing the last Tools Plus library.
  101.  
  102.  
  103.  
  104.  
  105.  
  106. After Compiling
  107. ```````````````
  108.   So far, you’ve told THINK Pascal what files to use and the order in which they should be compiled.  When you compile your project the first time, THINK Pascal loads the specified libraries and integrates them into your project file, and it compiles source files (including ToolsPlus.p) and integrates them in your project file.  After your first compile, you’ll notice that THINK Pascal automatically added several items to your project file:
  109.       «ToolsPlus.Lib1:1»
  110.       «ToolsPlus.Lib2:1»
  111.       «ToolsPlus.Lib3:1»
  112.       «%_MethTables»
  113.       «%_SelProcs»
  114.       «%_Profiler»
  115.  
  116.   The «ToolsPlus.Lib1:1», «ToolsPlus.Lib2:1» and «ToolsPlus.Lib3:1» items contain the object code from the Tools Plus libraries, while «%_MethTables», «%_SelProcs» and «%_Profiler» items are part of THINK Pascal’s overhead (consult your THINK Pascal User Manual for details).
  117.  
  118.   Drag «ToolsPlus.Lib1:1» into the same segment as ToolsPlus.Lib1, «ToolsPlus.Lib2:1» into the same segment as ToolsPlus.Lib2, etc.
  119.  
  120.   Drag «%_MethTables», «%_SelProcs» and «%_Profiler» to any segment that won’t be unloaded while your application is running, such as the one containing the Runtime.lib library.
  121.  
  122.   Even though the project window indicates that Segment 1 exceeds the 32k limit imposed on segments, the project will compile and run.  When you build your application, the smart linker will strip away unneeded code and significantly reduce the size of this segment.
  123.  
  124.  
  125. Note: Tools Plus does not have a dependency on the Runtime.lib library.
  126.       Unless your application needs routines that are found only in the
  127.       full Runtime.lib library, you can use the smaller µRuntime.lib
  128.       library instead
  129.  
  130.  
  131.  
  132.  
  133.  
  134. Tools Plus Segments in THINK Pascal
  135. ```````````````````````````````````
  136.   The segments containing Tools Plus libraries will be constantly accessed while your application is running.  It is preferable to pre-load those segments by flagging them as “Preload.”
  137.  
  138. Warning: Do not unload the segments containing Tools Plus libraries.
  139.          You can ensure that this doesn’t happen accidentally by
  140.          flagging them as not “Purgeable.”
  141.  
  142.  
  143.  
  144.  
  145. -----------------------------------------------------------------------
  146.  
  147.  
  148.  
  149.  
  150. Compiling The C Demo Application
  151. ````````````````````````````````
  152. The easiest way to compile the C demo application included with Tools Plus is to have the following files in the same folder:
  153.     Demo.π
  154.     Demo.π.rsrc
  155.     Demo.c
  156.     ToolsPlus.Lib1
  157.     ToolsPlus.Lib2
  158.     ToolsPlus.Lib3
  159.     ToolsPlus.h
  160.     ToolsPlus.c
  161.     PascalStrHandles.c
  162. Double-click the Demo.π project file to launch THINK C, then run your project.
  163.  
  164.   Your project file keeps track of each file’s location as you add it to your project, so you may want to create a new project file after you have put all the Tools Plus libraries and their related files in their permanent folders.  Create a new (empty) project named “Demo.π” in the same folder as “Demo.π.rsrc” and “PascalStrHandles.c”.  Add the following files to your new project:
  165.     Segment 1:   MacTraps
  166.                  MacTraps2
  167.     Segment 2:   ANSI
  168.     Segment 3:   ToolsPlus.Lib1
  169.     Segment 4:   ToolsPlus.Lib2
  170.     Segment 5:   ToolsPlus.Lib3
  171.                  ToolsPlus.c
  172.     Segment 6:   Demo.c
  173. You can now build your project and run your application.
  174.  
  175.  
  176. Note: Make sure you allocate sufficient memory to the debugger if you
  177.       are going to run the Tools Plus demo application with the debugger
  178.       on.  The Tools Plus demo was written as one large source file,
  179.       making it easier to compile and study, but making it hungry for
  180.       debugger memory.  Allocate at least 500K to the debugger.  If you
  181.       don’t have enough memory, turn the debugger off (Project menu,
  182.       deselect “Use Debugger”) when running the demo.
  183.         Your applications will likely be written in a more intelligent
  184.       fashion, abandoning one large source file in favor of several
  185.       smaller ones.
  186.  
  187.  
  188.  
  189. IMPORTANT! Errors when compiling the Demo…
  190. ``````````````````````````````````````````
  191.   At the time of this writing, Water’s Edge Software has made every effort to ensure that our demo application will compile successfully the first time. Unfortunately, Symantec C/C++ compilers have undergone a series of revisions and some inconsistencies have arisen between compiler versions. Fortunately, these differences are simple to resolve.
  192.  
  193.   If your compiler gives you an error that states “argument to function ‘x’ does not match prototype,” it indicates that Symantec has made a minor revision to that function’s prototype (in the error message, ‘x’ will be replaced by the function’s name). To correct this error, inspect the offending line in the source file, which is likely a line like:
  194.  
  195.     PenPat(&gray);
  196.  
  197. and revise it to match the prototype in the related header file. In the example above, the correction is as simple as changing the line to:
  198.  
  199.     PenPat(gray);        /* Remove ampersand (&) from the variable */
  200.  
  201.  
  202.   To date, all inconsistencies have been of this nature. We are sorry for the inconvenience these issues may cause you, and would like to offer our assistance if you have problems getting the demo compiled. See the “Technical Support” chapter for information on how to contact Water’s Edge Software for assistance.
  203.  
  204.  
  205.  
  206. -----------------------------------------------------------------------
  207.  
  208.  
  209.  
  210.  
  211. Compiling The Pascal Demo Application
  212. `````````````````````````````````````
  213. The easiest way to compile the Pascal demo application included with Tools Plus is to have the following files in the same folder:
  214.     Demo.π
  215.     Demo.π.rsrc
  216.     Demo.p
  217.     ToolsPlus.Lib1
  218.     ToolsPlus.Lib2
  219.     ToolsPlus.Lib3
  220.     ToolsPlus.p
  221. Double-click the Demo.π project file to launch THINK Pascal, then run your project.
  222.  
  223.   Your project file keeps track of each file’s location as you add it to your project, so you may want to create a new project file after you have put all the Tools Plus libraries and their related files in their permanent folders.  Create a new project named “Demo.π” in the same folder as “Demo.π.rsrc”.  Add the following files to your new project:
  224.     Segment 1:   Runtime.Lib
  225.                  Interface.Lib
  226.     Segment 2:   ToolsPlus.Lib1
  227.     Segment 3:   ToolsPlus.Lib2
  228.     Segment 4:   ToolsPlus.Lib3
  229.                  ToolsPlus.p
  230.     Segment 5:   Sound.p
  231.                  Demo.p
  232. You can now build your project.  After the initial compile, you will notice THINK Pascal created some additional entries in your project file:
  233.     «ToolsPlus.Lib1:1»
  234.     «ToolsPlus.Lib2:1»
  235.     «ToolsPlus.Lib3:1»
  236.     «%_MethTables»
  237.     «%_SelProcs»
  238.     «%_Profiler»
  239.  
  240.   The «ToolsPlus.Lib1:1», «ToolsPlus.Lib2:1» and «ToolsPlus.Lib3:1» items contain the object code from the Tools Plus libraries, while «%_MethTables», «%_SelProcs» and «%_Profiler» items are part of THINK Pascal’s overhead (consult your THINK Pascal User Manual for details).
  241.  
  242.   Drag «ToolsPlus.Lib1:1» into the same segment as ToolsPlus.Lib1, «ToolsPlus.Lib2:1» into the same segment as ToolsPlus.Lib2, and «ToolsPlus.Lib3:1» into the same segment as ToolsPlus.Lib3.
  243.  
  244.   Drag «%_MethTables», «%_SelProcs» and «%_Profiler» to any segment that won’t be unloaded while your application is running, such as the one containing the Runtime.lib library.
  245.  
  246.   Even though the project window indicates that Segment 1 exceeds the 32k limit imposed on segments, the project will compile and run.  When you build your application, the smart linker will strip away unneeded code and significantly reduce the size of this segment.
  247.